import request from '@/utils/request'

export const getUserInfo = () => request({
  url: '/admin-api/system/user/get?id=' + 1026
})
export const getUserList = params => request({
  url: '/admin-api/system/user/page',
  method: 'get',
  params
})
export const roleCate = data => request({
  url: '/admin-api/system/role/list-all-simple',
  method: 'get',
  data
})

export const userUpdate = data => request({
  url: '/admin-api/system/user/update',
  method: 'put',
  data
})

export const updatepPssword = data => request({
  url: '/admin-api/system/user/update-password',
  method: 'put',
  data
})
export const createUser = data => request({
  url: '/admin-api/system/user/create',
  method: 'post',
  data
})
export const deleteUser = params => request({
  url: '/admin-api/system/user/delete',
  method: 'delete',
  params
})
export const rolePage = params => request({
  url: '/admin-api/system/role/page',
  method: 'get',
  params
})
export const roleUpdate = data => request({
  url: '/admin-api/system/role/update',
  method: 'post',
  data
})
export const roleCreate = data => request({
  url: '/admin-api/system/role/create',
  method: 'post',
  data
})
export const roleDelete = data => request({
  url: '/admin-api/system/role/delete',
  method: 'post',
  data
})
//重置密码
export const userpassword = data => request({
  url: '/admin-api/system/user/update-password',
  method: 'put',
  data
})
//平台用户详情
export const userget = params => request({
  url:
    '/admin-api/system/user/get',
  method: 'get',
  params
})